package com.hhq.service.Impl;

import com.hhq.entity.Employee;
import com.hhq.mapper.EmployeeMapper;
import com.hhq.service.Employeeservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service

public class EmployeeserviceImpl implements Employeeservice {
    @Autowired
    EmployeeMapper employeeMapper;
    @Override
    public List<Employee> getAllEmployee() {
        return employeeMapper.getAllEmployee();
    }

    @Override
    public List<Employee> findEmployeeByName(String name) {
        return employeeMapper.findEmployeeByName(name);
    }

    @Override
    public int addEmployee(Employee employee) {
        return employeeMapper.addEmployee(employee);
    }

    @Override
    public void deleteEmployee(String name) {
        employeeMapper.deleteEmployee(name);
    }

    @Override
    public int updateEmployee(Employee employee) {
        return employeeMapper.updateEmployee(employee);
    }
}
